package com.zhentao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhentao.model.dto.product.ProductDto;
import com.zhentao.model.entity.product.Product;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductMapper extends BaseMapper<Product> {
    public abstract List<Product> findByPage(ProductDto productDto);

    public abstract Product selectById(Long id);

    public abstract int updateById(Product product);

    public abstract void save(Product product);
    @Select("SELECT COUNT(*) FROM product WHERE id = #{id}")
    boolean existsById(String id);
}
